﻿<%@ Page Title="Site Explorer" Language="C#" Inherits="System.Web.Mvc.ViewPage<Steve.UI.Administration.Models.SiteExplorerModel>" MasterPageFile="~/Views/Shared/Site.Master" %>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">
    <div class="toolbar">
        <a class="add-site-url new-document-button">Add Url</a> <label for="search-url-input">Search</label>
        <input id="search-url-input" name="search-url-input" type="search" />
        <a id="search-url-btn" class="search-button">Search</a>
    </div>    
    <div id="site-explorer" class="explorer-accordion" style="display:none">
        <% foreach (var s in Model.Sites)
           { %>
           <div data-treeview-key="s:<%: s.Authority %>">
           <div>
                <a><%: s.SiteName %> (<%: s.Authority%>)</a>
            </div>
            <div>
                <div class="toolbar"><a class="add-site-url new-document-button">Add Url</a>
                <%: Html.ActionLink("Edit Site", "SiteDetail", "SiteManagement", new { id = s.SiteName }, new { @class="edit-button" } )%>
                </div>
                <div>
                    <%: Html.Action("SiteChildUrls", "UrlManagement", new { siteName = s.SiteName })%>              
                </div>
            </div>
            </div>
        <% } %>
    </div>
</asp:Content>

<asp:Content ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript" src="/scripts/site-explorer.js"></script>
</asp:Content>